<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav">
	<span class="layui-breadcrumb">
		<a>首页</a>
		<a>彩票管理</a>
		<a>彩种管理</a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="?m={$m}&c={$c}" title="返回">
		<i class="layui-icon" style="line-height:30px">&lt;</i>
	</a>
</div>

<div class="x-body">
	<div class="layui-main">
		<form class="layui-form" action="?" method="post">
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
			<input type="hidden" name="operation" value="add"/>
			<input type="hidden" name="id" value="{$data['id']}"/>
			<div class="layui-form-item">
				<label class="layui-form-label">彩种名称：</label>
				<div class="layui-input-inline">
					<input type="text" name="data[title]" required="true" value="{$data['title']}" placeholder="彩种名称" autocomplete="off" class="layui-input">
				</div>
				<div class="layui-form-mid layui-word-aux"></div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图片：</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input" id="thumb" name="data[thumb]" value="{$data['thumb']}" />
				</div>
				<div class="layui-word-aux"><input type="button" onclick="imageupload('thumb')" value="上传图片" class="layui-btn" /></div>
			</div>
			<div class="layui-form-item" style="z-index: 99999;">
				<label class="layui-form-label">设置归属:</label>
				<div class="layui-input-inline">
					<select name="data[cate_id]">
						<option value="0">--顶级--</option>
						{loop $menuTreeData as $val}
							<option value="{$val['id']}" {if $data['cate_id'] == $val['id']} selected="selected" {/if}>{$val['line'] . $val['name']}</option>
						{/loop}
					</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">频率：</label>
				<div class="layui-input-block">
					<input type="radio" name="data[type]" value="1" title="低频彩" {if $data['type']=='1'}checked{/if}>
					<input type="radio" name="data[type]" value="2" title="高频彩" {if $data['type']=='2'}checked{/if}>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">销售：</label>
				<div class="layui-input-block">
					<input type="radio" name="data[sales]" value="1" title="正常销售" {if $data['sales']}checked{/if}>
					<input type="radio" name="data[sales]" value="0" title="暂停销售" {if !$data['sales']}checked{/if}>
				</div>
			</div>
			<div class="layui-form-item">
				<label for="" class="layui-form-label"></label>
				<div class="layui-input-inline">
					<a class="layui-btn" href='?m=user&c=notice'>返回</a>
					<button class="layui-btn" type="submit">确定</button>
				</div>
			</div>
		</form>
	</div>
</div>
<script src="static/layui/layui.js" charset="utf-8"></script>
<script>
	layui.use(['form', 'layedit', 'laydate'], function(){
	  var form = layui.form
	  ,layer = layui.layer
	  ,layedit = layui.layedit
	  ,laydate = layui.laydate;
	});
	</script>
	  
{template index/footer}